<?php

  /*
  @author: Ali GOREN
  @Year: 2012
  @Link: http://blog.aligoren.com
  @Licence: Free :D
  
  */

error_reporting(0);
function get_social_count_twitter( $link ) {
    $link = urlencode($link);
    $data = file_get_contents("http://urls.api.twitter.com/1/urls/count.json?url={$link}");
    $json = json_decode($data, true);
    $count = $json["count"];
    return $count ? $count : 0;
}


if ($_POST['site'])
{

	if(get_social_count_twitter($_POST['site']) > 0) {
	
		echo 'Bu websitesi ' .get_social_count_twitter($_POST['site']). ' kere paylasilmistir.';
	
	} else {
		
		echo 'Bu websitesi hic paylasilmamistir';
	}

} else {

	echo 'Lutfen bir adres giriniz<br/>';

}

echo '<form action="" method="POST">
<input type="text" name="site" />
<br><input type="submit" value="Gonder" />
</form>';


?>